When a picture is taken using a digital camera, typically red, green, and blue (RGB) pixel values are captured by respective sensors. Depending on a light source, coloring of certain objects may appear off. For example, when a white or gray object is illuminated with a low color temperature light source, the object in the captured image may appear reddish in color. Similarly, when a white or gray object is illuminated with a high color temperature light so the object in the captured image may appear bluish in color. A white balancing process, as described herein, is used to improve the quality of the captured image.